<?php 
include TEMPLATEPATH.'/photos/functions.php';
include TEMPLATEPATH.'/photos/process-multiple-upload.php';
?>
<!-- Cập nhật tùy chỉnh trang mail managerment -->                     
<div id="index_page" class="index_page">   		
   <form action="" method="post" id="logo_index_page" enctype="multipart/form-data">
   	
   	 	<label for="mySetting_company_gallery"><strong>Upload photos</strong><em></em></label><br/>
     	<input type="file" multiple="multipart" name="photos[]" size="60" class="file-input" value="Upload" /> <br/>     
              
   		<input type="submit" value="Upload" style="border-style:outset;border-width: 2px;font-weight: bold" />  
   		<a target="_blank" href="<?php echo WP_MYSITE_URL;?>/gallery">View Gallery</a>  
    	<?php wp_nonce_field('company_gallery_photos_multiple','company_gallery_photos_multiple'); ?>

   </form>		           
</div>
<?php 
            	$gallerys = db_select_all_data("gallerys");  
            	$uploaddir = wp_upload_dir();
            	$mypath = $uploaddir['baseurl'].'/';
            	//print_r($uploaddir);          	
            	?>
<div class="mylistgallery">
	<ul>
		<?php 
		if($gallerys)
		{
			foreach ($gallerys as $value) 
			{
				$thumbnail = $mypath.$value->url;
			?>
			<li>				
				<img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $thumbnail;?>&w=100&h=100" border="0"" alt="Title #0" />												
			</li>
			<?php 	
			}
		}
		?>							
	</ul>	
</div>